import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hk_base/hk_base.dart';

import '../components/dialog/custom_dialog.dart';

class Utils {

  /// 显示自定义对话框
  /*
  Utils.showCustomDialog(context,
        body: FeedBackDialog(
          titleMessage: titleMessage,
          reasons: reasons,
          outsideDismiss: false,
          reasonsCallback: reasonsCallback,
        ));
  */
  static showCustomDialog({String? title = "温馨提示"}) {
    Get.dialog(
      CustomAlertDialog(
        title: title,
        content: '该功能需要您授权相机访问权限',
        cancelStr: "暂不授权",
        onCancel: () => Get.back(),
        sureStr: "去授权",
        onSure: () {
          // openAppSettings();
          Get.back();
        },
      ),
      barrierDismissible: false,
      barrierColor: const Color(0xcc333333),
    );
  }
}